package cn.tmpan.consumer.controller;

import cn.tmpan.dubbo.service.IUserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController {

    @DubboReference(version = "1.0")
    private IUserService iUserService;

    @GetMapping("byId")
    public Object getUserById(String userId) {
        return iUserService.getUserInfoById();
    }
}
